import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { User } from '../entity/user.entity';
import { BaseService } from './base.service';

@Injectable()
export class Userervice extends BaseService<User> {
  constructor(
    @InjectRepository(User)
    private readonly userRepository: Repository<User>,
  ) {
    super(userRepository);
  }

  async findUserList() {
    return await this.userRepository.find();
  }

  async saveUser(request: any) {
    return await this.userRepository.save(request);
  }
}
